﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="wc_hh.aspx.cs" Inherits="Consultas_wc_hh" EnableEventValidation="false" %>
<%@ Register Src="../wuc/wuc_Header.ascx" TagName="wuc_Header" TagPrefix="uc1" %>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>Registro del informe de trabajos realizados</title>
    <link rel="stylesheet" href="../styles/a-main/a-main.css" type="text/css"/>    
    <script language="javascript" src="../include/DD_roundies_0.0.1a.js"></script>
    <script language="javascript" src="../include/popcalendar.js"></script>
    <script language="javascript" src="../include/fecha.js"></script>
    <script language="javascript">
    <!--
    if(window.history.forward(1) != null)
      window.history.forward(1);    
      
      
    function LimpiarFiltros() {
        document.getElementById('txtFecPrg').value="";
        document.getElementById('txtFecFin').value="";
        document.getElementById('txtMatAvion').value="";
        document.getElementById('txtCodAta').value="";
        document.getElementById('txtCodSubAta').value="";
        document.getElementById('txtTextoComponente').value="";
        document.getElementById('hid_CodComponente').value="";    
    }
      
    function popUpSelPerson(ctrl,ctrl2,PerCargo)
    {
    var url = "../persona/wfAddPerson.aspx?ctrl="+ctrl2+"&ccar="+PerCargo;
    window.open(url,"per","width=750,height=750,status=yes");
    }
    
    function popUpOpenTrab(ctrl,ctrl2,PerCargo)
    {
    var miForm = document.form1;
    alert(miForm.hid_IdInfTra.value);
    if(miForm.hid_IdInfTra.value.length >0)
    {    
    var url = "./wfPrgTrabDet.aspx?ctrl="+ctrl2+"&wv="+miForm.hid_IdInfTra.value;
    window.open(url,"trab","width=1000,height=1000,status=yes");
    }
    else
    {
    alert('No ha registrado el trabajo');
    }
    }
    
    function popUpOpenSelTrab(idTrab, seqTrab)
    {        
    var url = "./wfRegTrab.aspx?wv="+idTrab+"&sq="+seqTrab;
    window.open(url,"trab","width=1000,height=1000,status=yes");    
    }
    
    
    DD_roundies.addRule('#divCriterios', 10);
    -->
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <uc1:wuc_Header ID="Wuc_Header1" runat="server" />
    <span id="content">
<table width="100%" border="0">
  <tr>
    <td colspan="5" align="center" valign="top">
    
<table width="100%" cellpadding="5" cellspacing="0">
<tr>
    <td colspan="1" rowspan="3" valign="top">
        <table width="100%" cellspacing="2" cellpadding="0">
                                            <tr>
                                                <td class="CptWFMain">
                                                    Accesos Directos</td>
                                            </tr>
                                            <tr>
                                                <td class="Menu">
                                                <ul class="MenAccDirec">
                                <li><a href="../general/wfindex.aspx">Menu Principal</a></li>
                                <li><a href="../trabajo/wfPrgTrab.aspx">Programación de Trabajos</a></li>
                                <li><a href="../negociacion/wfNegociacion.aspx">Negociación</a></li>
                                <li><a href="../trabajo/wfRegInfTrab.aspx">Registro de Trabajos</a></li>
                                <li><a href="../Consultas/wfIndexConsultas.aspx">Consultas</a></li>
                                <li><a href="../Reportes/wfIndexRep.aspx">Reportes</a></li>
                                </ul>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="width: 3px">
                                                </td>
                                            </tr>
                                        </table>
    </td>
    <td id="CptSTitPUp" colspan="5">
        Consulta de Horas Hombre</td>
</tr>
<tr>
  <td colspan="5" style="height: 98px">
    
<div id="divCriterios" class="DivRound">
<table width="100%" border="0" cellspacing="3" cellpadding="2"> <!-- bordercolor="#ECECEC" -->
    <tr>
        <td colspan="7">
            <span class="lblCaption">Fecha de Inicio:&nbsp;
                <asp:TextBox ID="txtFecPrg" onblur="valFecha(this)" runat="server" ContentEditable="false" CssClass="inTextData" EnableViewState="False" MaxLength="10" Columns="10"></asp:TextBox>
        <img src="../styles/cssmain/calendar.gif" border="0" onclick="popUpCalendar(this, txtFecPrg, 'dd/mm/yyyy')" id="imgFecInfo" />
                &nbsp; &nbsp;&nbsp; &nbsp;<span class="lblCaption">Fecha de Fin:&nbsp; </span><asp:TextBox ID="txtFecFin" runat="server" CssClass="inTextData" ContentEditable="false"
            EnableViewState="False" onblur="valFecha(this)" MaxLength="10" Columns="10"></asp:TextBox><img src="../styles/cssmain/calendar.gif" border="0" onclick="popUpCalendar(this, txtFecFin, 'dd/mm/yyyy')" id="Img2" />
    
        </span>
        </td>
    </tr>
    <tr>
        <td colspan="7">
            <hr class="lin_sep" />
        </td>
    </tr>
    <tr>
        <td colspan="7">
            <span class="lblCaption">Avión:
            CC-<asp:TextBox ID="txtMatAvion" runat="server" CssClass="inTextData toUpper" Columns="8" MaxLength="6"></asp:TextBox>
                &nbsp;&nbsp;&nbsp;&nbsp;
            <span class="lblCaption">Origen:&nbsp;
                <asp:DropDownList ID="ddlOrigen" runat="server" CssClass="sel" AutoPostBack="True" OnSelectedIndexChanged="ddlOrigen_SelectedIndexChanged">
            </asp:DropDownList>
                &nbsp; &nbsp; &nbsp;&nbsp; 
                    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;
            <span class="lblCaption">Participación:&nbsp;
                <asp:DropDownList ID="ddlParticipacion" runat="server" CssClass="sel">
        </asp:DropDownList></span></span></span></td>
    </tr>
    <tr>
        <td colspan="7">
        <div id="divTipTra" runat="server" style="display:none;">
        <span class="lblCaption">Trabajo Realizado:</span><asp:DropDownList ID="ddlTipoTrabajo" runat="server" CssClass="sel"></asp:DropDownList>        
        <span class="lblCaption">Descripción del Trabajo:&nbsp;</span>
        <asp:TextBox ID="txtDescTrab" runat="server" Columns="100" CssClass="inTextData toUpper"></asp:TextBox>
        </div>        
        <div id="divATASATA" runat="server" style="display:none;">
                      <span class="lblCaption">Código ATA:</span>&nbsp;
                  <asp:TextBox ID="txtCodAta" runat="server" CssClass="inTextData toUpper" Columns="3" MaxLength="2"></asp:TextBox>
            <asp:TextBox ID="txtCodSubAta" runat="server" Columns="3" CssClass="inTextData toUpper"
                MaxLength="2"></asp:TextBox>
            <asp:TextBox ID="txtCodCompon" runat="server" Columns="3" CssClass="inTextData toUpper"
                MaxLength="2" Enabled="False" Visible="False">00</asp:TextBox>
            <asp:ImageButton ID="imgBuscaComp" runat="server" ImageUrl="../styles/a-main/look.gif" OnClick="imgBuscaComp_Click" />
                  &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span class="lblCaption">Componente:</span>&nbsp;
            <asp:TextBox ContentEditable="false" ID="txtTextoComponente" runat="server" CssClass="inTextData toUpper" Columns="75"></asp:TextBox>
                      &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
                      <asp:HiddenField ID="hid_CodComponente" runat="server" />                  
        </div>
        </td>
    </tr>
    <tr>
        <td colspan="7">
            <span style="font-size: 9pt; color: #10459c; font-family: Arial"><strong>Trabajo Prog
                / No Prg:&nbsp;&nbsp; &nbsp;&nbsp;
                <asp:DropDownList ID="ddlPrgNPrg" runat="server" CssClass="sel">
        </asp:DropDownList></strong></span></td>
    </tr>
    <tr>
        <td colspan="7">
            <asp:RadioButton ID="radDetallado" runat="server" Text="Reporte Detallado" GroupName="Vista" CssClass="lblCaption" />
            &nbsp; &nbsp;&nbsp; &nbsp;
            <asp:RadioButton ID="radConsolidado" runat="server" Text="Reporte Consolidado" GroupName="Vista" CssClass="lblCaption" /></td>
    </tr>
    <tr>
        <td align="center" colspan="7">
            &nbsp;<asp:ImageButton ID="imgConsultar" runat="server" ImageUrl="../styles/a-main/BTbuscar.gif"
                OnClick="imgConsultar_Click" />
            &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
            <a href="javascript:LimpiarFiltros();"><img border="0" src="../styles/a-main/LimpiarFiltros.gif" /></a></td>
    </tr>
</table>
</div>
      &nbsp;&nbsp;
            <asp:Label ID="lblMensaje" runat="server" CssClass="lblMensaje"></asp:Label>
</td>
</tr>
    <tr>
    <td colspan="5">
    
    <div id="divDetallado" runat = "server" style="display:none">
      <table border="0" cellpadding="0" cellspacing="0" width="100%"><tr>
<td width="1%" align="left" class="titGrid">
    <img src="../styles/a-main/FilGridTit.gif"></td>
            <td class="titGrid" style="width: 25%" >
                Resultados Detallados</td>
          <td>
          </td>
          <td>
          </td>
          <td>
          </td>
          <td>
          </td>
          <td align="right"><asp:ImageButton ID="imgToExcelDet" runat="server" ImageUrl="../styles/a-main/excel.jpg" ToolTip="Exportar a Excel" OnClick="imgToExcel_Click" Height="28px"  />
              &nbsp;</td>
          <td align="right">
          </td>
          <td align="right">
          </td>
      </tr>
          <tr>
              <td colspan="7">
                  <asp:GridView ID="gvTrab" runat="server" AutoGenerateColumns="False" BackColor="White"
                      BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="3" GridLines="Vertical" Width="100%" AllowPaging="True" OnPageIndexChanging="gvTrab_PageIndexChanging">
                      <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
                      <Columns>
                          <asp:BoundField HeaderText="Fecha" DataField="StrFecInfo" />
                          <asp:BoundField HeaderText="Avi&#243;n" DataField="MatAvion" />
                          <asp:BoundField HeaderText="Prog." DataField="DescPrgNPrg" />
                          <asp:BoundField HeaderText="Mecanico" DataField="MecNomCompleto" />
                          <asp:BoundField HeaderText="Trabajo" DataField="DescTrabajo" />
                          <asp:BoundField HeaderText="Responsa" DataField="DescTipoApoyo" />
                          <asp:BoundField HeaderText="HHReal" DataField="HHReal" />
                          <asp:BoundField HeaderText="HHEstim" DataField="HHEstimadoMostrar" />
                          <asp:BoundField HeaderText="Variacion(%)" DataField="StrHHVariacion" />
                          <asp:BoundField DataField="DescEstTrab" HeaderText="Estado" />
                          <asp:BoundField DataField="Obs" HeaderText="Observ/Acciones" />
                      </Columns>
                      <RowStyle BackColor="#EEEEEE" ForeColor="Black" CssClass="RowGrid" />
                      <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
                      <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" CssClass="GVPage" />
                      <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
                      <AlternatingRowStyle BackColor="Gainsboro" />
                  </asp:GridView>
              </td>
              <td colspan="1">
              </td>
              <td colspan="1">
              </td>
          </tr>
          <tr>
              <td width="1%">
              </td>
              <td style="width: 25%">
              </td>
              <td>
              </td>
              <td>
              </td>
              <td>
              </td>
              <td>
              </td>
              <td>
              </td>
              <td>
              </td>
              <td>
              </td>
          </tr>
      </table>
      </div>
      <div id="divConsolidado" runat = "server" style="display:none">
            <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
            <td width="1%" align="left" class="titGrid" style="height: 17px">
                <img src="../styles/a-main/FilGridTit.gif" /></td>
            <td class="titGrid" style="width: 25%; height: 17px;" >
                Resultados Consolidados</td>
            <td style="height: 17px">
            </td>
            <td style="height: 17px">
            </td>
            <td style="height: 17px">
            </td>
            <td style="height: 17px">
            </td>
            <td align="right" style="height: 17px"><asp:ImageButton ID="imgToExcelCons" runat="server" ImageUrl="../styles/a-main/excel.jpg" ToolTip="Exportar a Excel" OnClick="imgToExcelCons_Click" Height="28px"  />
                &nbsp;</td>
        </tr>
        <tr>
            <td colspan="7">
                <asp:GridView ID="gvConsol" runat="server" AutoGenerateColumns="False" BackColor="White"
                      BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="3" GridLines="Vertical" Width="100%" AllowPaging="True" OnPageIndexChanging="gvConsol_PageIndexChanging">
                    <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
                    <Columns>
                        <asp:BoundField DataField="MecNomCompleto" HeaderText="Mecanico" />
                        <asp:BoundField DataField="DescTrabajo" HeaderText="Trabajo" />
                        <asp:BoundField DataField="StrHHProm"  HeaderText="Tiempo Prom" >
                            <ItemStyle HorizontalAlign="Right" />
                        </asp:BoundField>
                        <asp:BoundField DataField="HHMin"  HeaderText="Tiempo Min" >
                            <ItemStyle HorizontalAlign="Right" />
                        </asp:BoundField>
                        <asp:BoundField DataField="HHMax"  HeaderText="tiempo Max" >
                            <ItemStyle HorizontalAlign="Right" />
                        </asp:BoundField>
                        <asp:BoundField DataField="StrHHVariacion" HeaderText="Variacion(%)" >
                            <ItemStyle HorizontalAlign="Right" />
                        </asp:BoundField>
                        <asp:BoundField DataField="NumVeces"  HeaderText="Cantidad Veces" >
                            <ItemStyle HorizontalAlign="Right" />
                        </asp:BoundField>
                    </Columns>
                    <RowStyle BackColor="#EEEEEE" ForeColor="Black" CssClass="RowGrid" />
                    <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" CssClass="GVPage" />
                    <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
                    <AlternatingRowStyle BackColor="Gainsboro" />
                </asp:GridView>
            </td>
        </tr>
        <tr>
            <td width="1%">
            </td>
            <td style="width: 25%">
            </td>
            <td>
            </td>
            <td>
            </td>
            <td>
            </td>
            <td>
            </td>
            <td>
            </td>
        </tr>
    </table>
    </div>
      
            </td>
</tr>
</table>




    </td>
  </tr>
</table>



</span>
    </form>
</body>
</html>